%%%-------------------------------------------------------------------
%%% @author Rain
%%% @doc 日志配置相关接口
%%% @end
%%%-------------------------------------------------------------------
-module(game_log_config).
-author("Rain").

%% API
-export([set_config_mod/1]).
-export([get/1, get/2]).


%% @doc 设置配置模块
set_config_mod(Mod) ->
    persistent_term:put({config_mod, log}, Mod).

%% @doc 获取配置模块
get_config_mod() ->
    persistent_term:get({config_mod, log}).

%% @doc 获取配置
get(Key) ->
    Mod = get_config_mod(),
    Mod:get(Key).
get(Key, Default) ->
    Mod = get_config_mod(),
    Mod:get(Key, Default).